<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<link href="<?php echo SKIN_PATH;?>digg.css" rel="stylesheet" type="text/css"/>
<!--begin main-->
<div id="main">
  <div id="main_l">
    <!--begin 面包屑导航-->
    <div id="position">当前位置：<a href="">首页</a><a href="<?php echo $M['url'];?>">Digg首页</a><?php if($catid) { ?><a href="<?php echo $M['url'];?>?catid=<?php echo $catid;?>"><?php echo $catname;?></a><?php } ?></div>
    <!--begin 评论列表-->
    <div class="commentbox">
      <div class="commenthead">今日关注度最高<?php if($catid) { ?><a href="<?php echo $caturl;?>"><?php echo $catname;?></a><?php } ?></div>
<?php $ARRAY = get("select d.contentid,d.supports,c.catid,c.title,c.style,c.thumb,c.url,c.description,c.inputtime from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 $where order by d.supports_day desc", 15, $page, "", "");$DATA=$ARRAY['data'];$total=$ARRAY['total'];$count=$ARRAY['count'];$pages=$ARRAY['pages'];unset($ARRAY);foreach($DATA AS $n=>$r){$n++;?>
<dl class="digg_list">
<dt><a href="<?php echo $r['url'];?>" target="_blank"><span class="<?php echo $r['style'];?>"><?php echo $r['title'];?></span></a></dt>
<dd class="digg_pic"><span><strong id="diggDivCount_<?php echo $r['contentid'];?>"><?php echo $r['supports'];?></strong></span><br />
  <samp id="diggDivDo_<?php echo $r['contentid'];?>"><?php if($digg->is_done($r['contentid'])) { ?>顶过了<?php } else { ?><span onclick="digg(<?php echo $r['contentid'];?>)">顶一下</span><?php } ?></samp> </dd>
<dd class="digg_txt"><?php echo str_cut($r[description], 180, '...');?></dd>
<dd class="digg_attribute">发布时间：<?php echo date('Y-m-d', $r[inputtime]);?>　栏目：<a href="<?php echo $CATEGORY[$r['catid']]['url'];?>"><?php echo $CATEGORY[$r['catid']]['catname'];?></a></dd>
</dl>
<?php } unset($DATA); ?>
<?php if($pages) { ?><p id="pages"><?php echo $pages;?></p><?php } ?>
     </div>
    <!--end 评论列表-->
  </div>
  <!--begin 右侧边栏-->
  <div id="main_r">
    <div><script language="javascript" src="data/js.php?id=3"></script></div>
    <h4 class="bdr_t_0">本周关注度最高<?php echo $catname;?></h4>
    <div>
      <ul class="digg_text_list">
<?php $DATA = get("select d.contentid,d.supports,c.title,c.style,c.thumb,c.url,c.inputtime from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 $where order by d.supports_week desc", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><span><?php echo $r['supports'];?></span><a href="<?php echo $r['url'];?>" target="_blank"><font class="<?php echo $r['style'];?>"><?php echo str_cut($r[title], 44);?></font></a></li>
<?php } unset($DATA); ?>
      </ul>
    </div>
    <h4>本月关注度最高<?php echo $catname;?></h4>
    <div>
      <ul class="digg_text_list">
<?php $DATA = get("select d.contentid,d.supports,c.title,c.style,c.thumb,c.url,c.inputtime from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 $where order by d.supports_month desc", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><span><?php echo $r['supports'];?></span><a href="<?php echo $r['url'];?>" target="_blank"><font class="<?php echo $r['style'];?>"><?php echo str_cut($r[title], 44);?></font></a></li>
<?php } unset($DATA); ?>
      </ul>
    </div>
  </div>
  <!--end 右侧边栏-->
</div>
<!--end　主体-->
<?php include template('phpcms','footer'); ?>
<SCRIPT LANGUAGE="JavaScript">
<!--
var digg_listurl = "顶过了";
function digg(id)
{
$.get('<?php echo $MODULE['digg']['url'];?>digg.php?contentid='+id+'&flag=1', function(data){
 if(data > 0) $('#diggDivCount_'+id).html(data);
 $('#diggDivDo_'+id).html(digg_listurl);
});
}
//-->
</SCRIPT>